//
// Created by Administrator on 2023/8/2.
//

#include <iostream>
#include <vector>
#include <unordered_set>

using namespace std;

class Solution {
public:
    int minimumOperations(vector<int> &nums) {
        // 统计nums中不同的非0整数
        unordered_set<int> set;
        for (int i = 0; i < nums.size(); i++) {
            if (nums[i] != 0) {
                set.insert(nums[i]);
            }
        }
        return set.size();
    }
};

int main() {
    Solution s;
    vector<int> nums = {0};
    cout << s.minimumOperations(nums) << endl;
    return 0;

}